(c-basic-common-init): Install `c-fill-paragraph' on
authorMartin Stjernholm <mast@lysator.liu.se>
Sun, 9 Feb 2003 01:44:35 +0000 (01:44 +0000)
committerMartin Stjernholm <mast@lysator.liu.se>
Sun, 9 Feb 2003 01:44:35 +0000 (01:44 +0000)
`fill-paragraph-function'.  Although it's not the normal way to call
it in a CC Mode buffer it makes a direct call to `fill-paragraph' work
better.

lisp/progmodes/cc-mode.el

index 2073a4a3371a210bf0edb91b14d251f21c321d31..94eb6fcaea4dd41e1f3502b10b9af01de1fd3776 100644 (file)
        comment-start-skip "/\\*+ *\\|//+ *"
        comment-multi-line t)
 
+  ;; Install `c-fill-paragraph' on `fill-paragraph-function' so that a
+  ;; direct call to `fill-paragraph' behaves better.  This still
+  ;; doesn't work with filladapt but it's better than nothing.
+  (make-local-variable 'fill-paragraph-function)
+  (setq fill-paragraph-function 'c-fill-paragraph)
+
   ;; Set `require-final-newline' only if we should.
   (let ((rfn (assq mode c-require-final-newline)))
     (when rfn